<html>
<head>
<title>AdubyTree Demo</title>

<script src="jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script src="jquery.adubytree.js" type="text/javascript"></script>
<link rel="StyleSheet" href="themes/adubytree.css" type="text/css" />
<script type="text/javascript">
jQuery(document).ready(function(){ 

var jsondata ={id : "node-0" , data: "C:",
		children: [
			{ id : "node-1" ,data: "node1",
				children: [
					{ id : "node-1-1" ,data: "node1.1",
						children: [
						{ id : "node-1-1-1" ,data: "node1.1.1"},
						{ id : "node-1-1-2" ,data: "node1.1.2"}
						]},
					{id : "node-1-2" , data: "node1.2"},
					{id : "node-1-3" ,data: "node1.3"}
				] 
			},
			{id : "node-2" ,data: "node2"},
			{id : "node-3", data: "node3",
				children: [
					{ id : "node-3-1" ,data: "node3.1",
					children: [
						{id : "node-3-1-1" , data: "node3.1.1",
							children: [
								{ id : "node-3-1-1-1" , data: "node3.1.1-1"},
								{ id : "node-3-1-1-2" , data: "node3.1.1-2"}
							] 
						}
					] 
					}
				] 
			}
		] 
	};
	
	var xmldata ='<?xml version="1.0"?><root>';
	xmldata +="<id>node-1</id><data>c:</data><children>";
	xmldata +=		"<node><id>node-1-1</id><data>node-1-1</data></node>";
	xmldata +=		"<node><id>node-1-2</id><data>node-1-2</data></node>";
	xmldata +=		"<node><id>node-1-3</id><data>node-1-3</data><children>";
	xmldata +=			"<node><id>node-3-1</id><data>node-3-1</data><children>";
	xmldata +=				"<node><id>node-3-1-1</id><data>node-3-1-1</data></node>";
	xmldata +=				"<node><id>node-3-1-2</id><data>node-3-1-2</data></node>";
	xmldata +=			"</children></node>";
	xmldata +=		"<node><id>node-3-2</id><data>node-3-2</data></node>";
	xmldata +=	"</children></node>";
	xmldata +="</children></root>";
	

	$("#localJson").AdubyTree({
		data:jsondata,
		dataType:"json",
		checkboxes:true
		});

		
	function getopenid(node){
		alert(node.id);
	}
	$("#localXml").AdubyTree({
		data:xmldata,
		dataType:"xml",
		type	:"GET",
		onSelected  : getopenid,
		checkboxes:true
	});		
});

</script>
<style type="text/css">   
table, td {   
    border:1px solid #cccccc;   
    border-collapse:collapse;  
}   
</style>
</head>
<body>
<div align="center">
|<a href="./styledemo.html">AdubyTree Style</a>|<a href="./themesdemo.html">AdubyTree Themes</a>|<a href="./ajaxdemo.html">AdubyTree Ajax Demo</a>|<a href="./demo.html">AdubyTree Local Data</a>|
<table border="1">
	<tr>
		<td width="400px"><div align="center"><strong>LocalJson</strong></div></td>
		<td width="400px"><div align="center"><strong>LocalXml</strong></div></td>
	</tr>
	<tr>
		<td  valign ="top"><div id="localJson"></div></td>
		<td valign ="top"><div id="localXml"></div></td>
	</tr>
</table> 
</div>
</body>
</html>